package com.jin.rules.controller;

import com.jin.rules.entity.Order;
import com.jin.rules.service.RuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Package:com.jin.rules.controller
 * @ClassName: OrderController
 * @Description:
 * @Date: 2022/12/02 15:49
 * @Author: Jin
 */
@RestController
@RequestMapping("/rules/order")
public class OrderController {
    @Autowired
    private RuleService ruleService;

    @RequestMapping("/saveOrder")
    public Order saveOrder(@RequestBody Order order){
        return ruleService.executeRule(order);
    }
}
